package com.zsck.pos.activity.multiBill;

import com.zsck.pos.base.BaseModel;
import com.zsck.pos.base.BasePresenter;
import com.zsck.pos.base.CallbackListener;
import com.zsck.pos.bean.MultiBills;

public class MultiPresenter extends BasePresenter<MultiContract.View> implements MultiContract.Presenter{

    private MultiModel multiModel ;
    public MultiPresenter(MultiContract.View mvpView) {
        super(mvpView);
    }


    @Override
    public BaseModel getModel() {
        multiModel= new MultiModel();
        return multiModel;
    }

    @Override
    public void loadMultiBills(String projectId, String condition, String collectionObjId, int currentPage, int pageSize, String contractNo, String beginMonth, String endMonth) {
        multiModel.loadMultiBills(projectId, condition, collectionObjId, currentPage, pageSize, contractNo, beginMonth, endMonth, new CallbackListener<MultiBills>() {
            @Override
            public void onCallbackSuccess(MultiBills bean) {
                mvpView.loadBillsSuccess(bean);
            }

            @Override
            public void onCallbackFailed(String msg) {
                mvpView.onFailure(msg);
            }
        });
    }
}
